using System;
using System.Collections.Generic;
using System.Text;
using System.Web.Security;

namespace Stormwind.Business.Rules {
	/// <summary>
	/// Authentication rules.
	/// </summary>
	public static class AuthenticationRules {
		/// <summary>
		/// Authenticates an user. This is not an action to be performed by this controller.
		/// </summary>
		/// <param name="username">Username.</param>
		/// <param name="password">Password.</param>
		/// <returns>Returns true if the user has been authenticated.</returns>
		[AjaxPro.AjaxMethod]
		public static bool Authenticate(string username, string password) {
			if (Membership.ValidateUser(username, password)) {
				return true;
			}

			return false;
		}
	}
}
